package cz.proks.easyhelpdesk.gwt.activity;

import com.google.gwt.event.shared.EventBus;
import com.google.gwt.place.shared.PlaceHistoryMapper;
import com.google.gwt.user.client.ui.AcceptsOneWidget;

import cz.proks.easyhelpdesk.gwt.ClientFactory;
import cz.proks.easyhelpdesk.gwt.Globals;
import cz.proks.easyhelpdesk.gwt.activity.base.BaseActivity;
import cz.proks.easyhelpdesk.gwt.place.LogoutPlace;
import cz.proks.easyhelpdesk.gwt.place.WelcomePlace;

public class LogoutActivity extends BaseActivity<LogoutPlace>{
    
    public LogoutActivity(LogoutPlace place, ClientFactory clientFactory, PlaceHistoryMapper placeMapper) {
        super(place, clientFactory, placeMapper);
    }

    @Override
    public void start(AcceptsOneWidget panel, EventBus eventBus) {
        Globals.clear();
        getClientFactory().getPlaceController().goTo(new WelcomePlace());
    }    
}
